<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet/less" type="text/css" href="statics/less/email/write.less" />
<script src="statics/lib/extend/less.min.js"></script>
<script src="statics/lib/extend/tipso.min.js"></script>
<script type="text/javascript" src="statics/modules/ckeditor/ckeditor.js"></script>
<link rel="stylesheet" href="statics/lib/extend/tipso.min.css">
<!--<script type="text/javascript" src="//unpkg.com/wangeditor/dist/wangEditor.min.js"></script>-->
<style>
@font-face {
  font-family: 'iconfont';  /* project id 2194848 */
  src: url('//at.alicdn.com/t/font_2194848_5ns4jj7mcc3.eot');
  src: url('//at.alicdn.com/t/font_2194848_5ns4jj7mcc3.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_2194848_5ns4jj7mcc3.woff2') format('woff2'),
  url('//at.alicdn.com/t/font_2194848_5ns4jj7mcc3.woff') format('woff'),
  url('//at.alicdn.com/t/font_2194848_5ns4jj7mcc3.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_2194848_5ns4jj7mcc3.svg#iconfont') format('svg');
}

</style>
<div class="writePage">
	<div class="head">
		<button type="button" class="layui-btn layui-btn-sm" onclick="sendEmail()"><i class="layui-icon">&#xe609;</i>发送</button>
		<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="saveEmail()">存草稿</button>
		<button type="button" class="layui-btn layui-btn-primary layui-btn-sm">预览</button>
		<div class="sub">
			<span class="layui-breadcrumb" lay-separator="|">
			  <a style="cursor: pointer;" id="chaosong" onclick="doCxr(this)">抄送</a>
			  <a style="cursor: pointer;" id="misong" onclick="doMxr(this)">密送</a>
			  <a style="cursor: pointer;" onclick="doQfdx(this)">群发单显</a>
			  <a style="cursor: pointer;" onclick="doRegularly()"><i class="layui-icon">&#xe60e;</i>定时发送</a>
			</span>
		</div>
		<div class="right hwidget" style="float:right; top: 5px;">
			<i title="关闭当前页" onClick="closeEdite()" class="layui-icon">ဆ</i>
		</div>
	</div>
	<div class="collectaset">
		<div class="ipt">
			<span id="sjr">收件人</span>
			<i style="cursor: pointer" onclick="searchs(1)">&#xe60f;</i>
			<div class="xm-select">
				<input id="recipient" value="" class="layui-hide"/>
			</div>
		</div>
		<div class="ipt" id="cxr" style="display: none;">
			<span>抄送人</span>
			<i style="cursor: pointer" onclick="searchs(2)">&#xe60f;</i>
			<div class="xm-select">
				<input id="ccpeople" value="" class="layui-hide"/>
			</div>
		</div>
		<div class="ipt" id="msr" style="display: none;">
			<span>密送人</span>
			<i style="cursor: pointer" onclick="searchs()">&#xe60f;</i>
			<div  class="xm-select">
				<input id="closesendpeople" value="" class="layui-hide"/>
			</div>
		</div>
		<div class="ipt">
			<span>主题</span>
			<input placeholder="请输入主题" class="emailSubject"/>
			<i style="margin-left: 5px" onclick="addtheme()" id="addtheme">&#xe60f;</i>
		</div>

	</div>

	<div class="ipt" style="border-bottom:none">
		<a id="tjfj" style="margin-right: 5px" class="layui-btn layui-btn-primary layui-btn-sm">添加附件</a>
<%--		<a onclick="systemfiles()" class="layui-btn layui-btn-primary layui-btn-sm">系统文件</a>--%>
		<div class="right" style="float:right; ">
			<a style="cursor: pointer" lay-filter="insertthesignature" id="template">插入签名<i class="layui-icon layui-icon-triangle-d"></i></a>
		</div>
	</div>
	<div class="ipt" >
		<div class="items" id="adjuncts">

		</div>
	</div>
	<div id="content">
		<textarea class="ckeditor" id="textarea" rows="100" cols="80" name="financial.bz"></textarea>
		<script type="text/javascript">
			CKEDITOR.replace('financial.bz', {
				height: 500,
				// Configure your file manager integration. This example uses CKFinder 3 for PHP.
				// filebrowserBrowseUrl: '/erp_ui_war_exploded/email/uploadCkEditor',
				// filebrowserImageBrowseUrl: '/erp_ui_war_exploded/email/uploadCkEditor',
				// filebrowserUploadUrl: '/erp_ui_war_exploded/email/uploadCkEditor',
				// filebrowserImageUploadUrl: '/erp_ui_war_exploded/email/uploadCkEditor',
				filebrowserBrowseUrl: '/erp/email/uploadCkEditor',
				filebrowserImageBrowseUrl: '/erp/email/uploadCkEditor',
				filebrowserUploadUrl: '/erp/email/uploadCkEditor',
				filebrowserImageUploadUrl: '/erp/email/uploadCkEditor',
			});
		</script>
	</div>
	<div class="head">
		<button type="button" class="layui-btn layui-btn-sm" onclick="sendEmail()"><i class="layui-icon">&#xe609;</i>发送</button>
		<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="saveEmail()">存草稿</button>
		 <form class="layui-form layui-form-pane" action="" style="display: inline-block;margin-left:40px">
		        <select class="layui-btn-sm" id="user-smtp">
		         </select>
	         </form>
		<form class="layui-form layui-form-pane" action="" style="display: inline-block;">
			    
			      <input type="checkbox" name="like[write]" title="紧急">
			      <input type="checkbox" name="like[read]" title="需要回执">
			      <input type="checkbox" name="like[game1]" title="纯文本">
		  </form>
		  
	</div>
</div>
<div id="BadgeWindow" style="display: none;">
	<div class="badge-window">
		<div>
			<input type="text" placeholder="标签名称">
		</div>
		<div>
			<input type="checkbox" checked><span class="layui-badge badge">标签1</span><br>
			<input type="checkbox"><span class="layui-badge badge">标签2</span>
		</div>
		<div>
			<a onclick="showCreateBadgeWindow()"><i class="layui-icon">&#xe61f;</i>新增</a>
			<a onclick="layer.closeAll()">取消选中</a>
			<a onclick="layer.closeAll()">确认</a>
		</div>
	</div>
</div>
<div id="CreateBadgeWindow" style="display: none;">
	<form class="layui-form" action="" style="padding:20px;">
		<div class="layui-form-item">
			<label class="layui-form-label">名称</label>
			<div class="layui-input-block">
				<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入名称" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">颜色</label>
			<div class="layui-input-inline" style="width: 120px;">
				<input type="text" value="" placeholder="请选择颜色" class="layui-input" id="test-form-input">
			</div>
			<div class="layui-inline" style="left: -11px;">
				<div id="test-form"></div>
			</div>
		</div>
	</form>
</div>

<div id="CreateBadgeWindow" style="display: none;">
	<form class="layui-form" action="" style="padding:20px;">
		<div class="layui-form-item">
			<label class="layui-form-label">名称</label>
			<div class="layui-input-block">
				<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入名称" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">颜色</label>
			<div class="layui-input-inline" style="width: 120px;">
				<input type="text" value="" placeholder="请选择颜色" class="layui-input" id="test-form-input">
			</div>
			<div class="layui-inline" style="left: -11px;">
				<div id="test-form"></div>
			</div>
		</div>
	</form>
</div>

<div id="doRegularly" style="display: none;">
	<form class="layui-form" action="" style="padding:20px;">
		<div class="layui-form-item">
			<label class="layui-form-label">选择时区</label>
			<div class="layui-input-block">
				<select name="selecttimezone" lay-search="">
					<option value="">直接选择或搜索选择</option>
					<option value="1">(UTC+08:00)北京，重庆，香港特别行政区，乌鲁木齐</option>
				</select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">当地时间</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" id="test1" placeholder="yyyy-MM-dd HH:mm:ss">
			</div>
		</div>
	</form>
</div>


<script id="insertthesignature"  type="text/html">
	<div style="display:flex;" >
		<div style="width: 100px;" class="moremune" id="email_template">

		</div>
	</div>
</script>




<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/lay/modules/tagsInput.js"></script>
<script src="statics/js/BasicData/email/write.js"></script>